package com.wn.ziroombackend.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.wn.ziroombackend.entity.OrderRoom;
import com.wn.ziroombackend.mapper.OrderMapper;
import com.wn.ziroombackend.mapper.OrderRoomMapper;
import com.wn.ziroombackend.service.OrderRoomService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wangzhijia
 * @since 2023-02-27 10:56:29
 */
@Service
public class OrderRoomServiceImpl extends ServiceImpl<OrderRoomMapper, OrderRoom> implements OrderRoomService {

    @Autowired
     private OrderRoomMapper orderMapper;


    @Override
    public PageInfo<OrderRoom> queryOrderRoomList(Integer now, Integer size, String name) {
          PageHelper.startPage(now, size);
          List<OrderRoom> orderRoomList = orderMapper.selectPageList(name);
        return new PageInfo<>(orderRoomList);
    }
}
